# this is a sample python app that gets data from the standard provider
import httplib, sys, urllib
conn = httplib.HTTPConnection("localhost",8080)
headers = {"Content-type": "application/x-www-form-urlencoded"}
params = {'extra': 'az'}
if (len(sys.argv) <= 1):
  print "You must provide the string to place into the created sample entity: e.g. something OR 'some stuff'"
  sys.exit()
else:
  stuff = sys.argv[1]
  params['stuff'] = stuff
print "Request to:", "/eb/standard/new"
conn.request("POST", "/eb/standard/new", urllib.urlencode(params), headers)
res = conn.getresponse()
print "Status:", res.status, res.reason
data = res.read()
print "EntityId::", data
conn.close()
